#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<assert.h>
void* my_memcpy(void* destination, const void* source, size_t num) {
	assert(destination && source);
	char* p = (char*)destination;
	while (num) {
		*(char*)destination = *(char*)source;
		destination = (char*)destination + 1;
		source = (char*)source + 1;
		num--;
	}
	return p;
}
int main() {
	int arr1[5] = { 0,1,2,3,4 };
	int arr2[5] = { 5,6,7,8,9 };
	for (int i = 0; i < 5; i++) {
		printf("%d ", arr1[i]);
	}
	printf("\n");
	my_memcpy(arr1, arr2, 1 * sizeof(int));
	for (int i = 0; i < 5; i++) {
		printf("%d ", arr1[i]);
	}
	return 0;
}